Rank-Nullity Theorem
Introduction
The Rank–Nullity Theorem is one of the most elegant results in linear algebra. It reveals a deep structural balance inside every linear transformation: the dimension of the input space is partitioned into two complementary pieces—one measuring how much information is preserved (rank), and the other measuring how much information collapses to zero (nullity).
This article assumes you already understand:
- Rank of a matrix
- Null space of a matrix
- Linear transformations between vector spaces
Our goal is to show how these ideas fit together into a single, powerful identity.
Linear transformations and dimensions
Consider a linear transformation $$T : \mathbb{R}^n \to \mathbb{R}^m.$$ Key facts:
- The domain has dimension $n$.
- The image (or range) of $T$ has dimension equal to the rank.
- The null space of $T$ has dimension equal to the nullity.
These two subspaces—image and null space—capture everything that can happen to a vector under $T$:
- The null space captures what is lost.
- The image captures what is kept.
The Rank–Nullity Theorem
The theorem states: $$\text{rank}(T) + \text{nullity}(T) = n.$$ Or, for a matrix $A$ with $n$ columns: $$\text{rank}(A) + \text{nullity}(A) = n.$$ Interpretation:
- Every vector in $\mathbb{R}^n$ can be decomposed into two parts:
- one part that survives the transformation (contributing to rank),
- one part that is annihilated (contributing to nullity).
- These two contributions always add up to the full dimension of the domain.
Why the balance holds
A matrix $A$ with $n$ columns defines a transformation $T(x) = Ax$. When we row‑reduce $A$:
- Pivot columns correspond to rank.
- Non‑pivot columns correspond to free variables, which determine the nullity.
Thus:
- Number of pivot columns = rank
- Number of free variables = nullity
- Total columns = pivot columns + free variables
So the identity is built directly into the structure of row‑reduction.
Geometric intuition
Think of $T$ as reshaping space:
- Rank tells you the dimension of the “shadow” cast by the transformation.
- Nullity tells you how many directions collapse into the origin.
Examples:
- If nullity is large, many directions collapse, and the image is thin.
- If rank is large, the transformation preserves many independent directions.
This balance is unavoidable: increasing one decreases the other.
Examples
Example 1: A full‑rank matrix
Let $$A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}.$$
- Rank = 2
- Nullity = 0
- Rank + nullity = 2
Nothing collapses; everything is preserved.
Example 2: A projection
Let $$A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}.$$
- Rank = 1
- Nullity = 1
- Rank + nullity = 2
One dimension survives; one collapses.
Example 3: A wide matrix
Let $$A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \end{bmatrix}.$$
- Rank = 1
- Nullity = 2
- Rank + nullity = 3
Two degrees of freedom go to zero; one survives.
Applications
- Solving linear systems
Nullity tells you how many free parameters a solution has. - Understanding invertibility
A matrix is invertible exactly when nullity = 0 and rank = $n$. - Data compression and dimensionality reduction
Rank describes how much information is retained. - Differential equations and linear operators
Rank–nullity generalizes to infinite‑dimensional settings.
Exercises
- A $5 \times 7$ matrix has rank $4$. What is its nullity?
- Suppose a matrix $A$ has $10$ columns and nullity $3$. What is $\text{rank}(A)$?
- A linear transformation $T : \mathbb{R}^6 \to \mathbb{R}^4$ has rank $2$. Compute its nullity.
- True or false: If a matrix has nullity $0$, then it must be square.
- Give an example of a $3 \times 3$ matrix with rank $1$ and explain why its nullity must be $2$.
- A matrix $A$ has $8$ columns. After row‑reduction, you find $5$ pivot columns. What is the nullity?
- Consider a projection matrix onto a line in $\mathbb{R}^3$. What are its rank and nullity?
- Let $A$ be a $4 \times 6$ matrix with nullity $4$. What is its rank?